﻿create proc thuan_qtdanhmucnhommenunguoidungsua  
@ID int,  
@DienGiai nvarchar(255)  
as  
if exists(select * from DanhMuc_NhomMenuNguoiDung  Where MaNhomMenuND<>@ID and TenNhomMenuND=@DienGiai)  
begin  
select ErrCode=0  
end  
else  
begin  
update DanhMuc_NhomMenuNguoiDung  set TenNhomMenuND=@DienGiai WHere MaNhomMenuND=@ID  
select ErrCode=1  
end